package com.smart.ve.dao;


import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.smart.ve.dto.MemberTableDto;



@Repository("MemberDAO")
public class MemberDao{
	
	@Autowired private SqlSession sql;
	
	public int checkUser(MemberTableDto param){
		int succ = 0;
		succ = sql.selectOne("member.check", param);
		return succ;
	}
	public int newUser(MemberTableDto param){
		return sql.insert("member.newUser", param);
	}
	public MemberTableDto login(MemberTableDto param) {
		return sql.selectOne("member.login", param);
	}
	
/*	public int checkMember(MemberTableDto param) {
		return (Integer)getSqlMapClientTemplate().queryForObject("member.checkMember", param);
	}
	public int insert(MemberTableDto param) {
		return (Integer)getSqlMapClientTemplate().insert("member.insert", param);
	}
	public MemberTableDto checkLogin(MemberTableDto param) {
		return (MemberTableDto)getSqlMapClientTemplate().queryForObject("member.checkLogin", param);	
	}

	
	public int upd(FunctionTableDto param) {
		return getSqlMapClientTemplate().update("nsFunction.upd", param);
	}
	
	public int del(FunctionTableDto param) {
		return getSqlMapClientTemplate().update("nsFunction.del", param);
	}
	
	@SuppressWarnings("unchecked")
	public List<HashMap<String, String>> getList(FunctionTableDto param) {
		return (List<HashMap<String, String>>)getSqlMapClientTemplate().queryForList("nsFunction.getList", param);
	}
	*/
	
}
